package com.zone.editor.utils;

/**
 * @Author: pkqlqx
 * @CreateDate: 2021/12/23 12:43
 * @Description:
 */
public class NumberUtil {

    public static int floatToInt(float f){
        int i = 0;
        if(f>0) //正数
        {
            i = (int)(f*10 + 5)/10;
        }
        else if(f<0) //负数
        {
            i =  (int)(f*10 - 5)/10;
        }
        else {
            i = 0;
        }
        return i;
    }
}
